package cn.edu.zzuli.nothinglink.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author suzyyy
 * @since 2021-04-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Problem implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "problem_id", type = IdType.AUTO)
    private Integer problemId;

    /**
     * 为了方便，用json格式存储问题详细信息
     */
    private String problemInfo;

    /**
     * 属于哪条开播记录，用于数据回显
     */
    private Integer recordId;

    @TableField(value = "problem_uuid")
    private String problemUuid;

    /**
     * 发出时间。
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 回答对的人数
     */
    private Integer trueNumber;

    /**
     * 总人数
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Integer totalNumber;


}
